<header class="special">
    <div class="left_info">
        <img src="/images/icon4.png" alt="">
        <h1>{{ config('vars.full_sys_name') }}</h1>
    </div>

    <div class="right_user">
        {{ $user->getRoleDisplayText() }}
        @if ($user->isPersonalUser())
            （个人用户）
        @endif
        @if ($user->isOrgUser())
            <span>（</span>
            <span>单位用户，</span>
            @if ($user->isOrgCertified())
                <span>已认证</span>
            @elseif ($user->isOrgCertifyFailed())
                <p>
                    <span>未通过认证，请重新</span>
                    <a-upload
                            name="file" accept=".jpg,.jpeg,.png"
                            :showUploadList="false"
                            action="/api/common/upload"
                            :beforeUpload="handleOrgBusinessLicensePhotoBeforeUpload"
                            @change="handleOrgBusinessLicensePhotoUploadChange($event)"
                    >
                        <a href="javascript:;">上传</a>
                    </a-upload>
                    营业执照
                </p>
            @else
                <span>等待管理员认证</span>
            @endif
            <span>）</span>
        @endif
        <a-dropdown style="margin-left: 10px;">
            <a class="ant-dropdown-link" href="#">
                {{ $user->name }}
                <a-icon type="down"/>
            </a>
            <a-menu slot="overlay" @click="handleHeaderDropdownItemClick">
                <a-menu-item key="change-password">修改密码</a-menu-item>
                <a-menu-item key="logout">退出</a-menu-item>
            </a-menu>
        </a-dropdown>
    </div>

    <a-modal v-model="changePasswordDialogVisible" :width="400" title="修改密码" @ok="handleChangePasswordOk">
        <div class="input_box">
            <div class="input_label">新密码</div>
            <div class="input_box">
                <a-input placeholder="8-16位" maxlength="16" size="large" type="password"
                         v-model="passwordInfo.password" autocomplete="new-password">
                </a-input>
            </div>
        </div>
        <div class="input_box">
            <div class="input_label">确认新密码</div>
            <div class="input_box">
                <a-input placeholder="确认新密码" maxlength="16" size="large" type="password" v-model="passwordInfo.passwordConfirm" autocomplete="new-password">
                </a-input>
            </div>
        </div>
    </a-modal>
</header>